#include <stdio.h>
#include <stdbool.h>
#include "Dlink.h"
#include "search.h"
#include "tslib.h"
#include "pic.h"
#include "other.h"

int main(int argc, char const *argv[])
{


	char Head_data[num]="0";
	int ts_point[3];
	LcdDev *lcd = init_lcd("/dev/fb0");
	
	if(init_process(lcd)){
		perror("init_process fail");
	}


	D_list * List_Head=create_kernel_link(Head_data);
	search_file("/", ".jpg",List_Head);
	printf("search over\n");
	show_jpeg_file (lcd , "./pic/02.jpg");
	// show_kernel_link(List_Head);


	
	while(1){
		init_ts(ts_point);
		if(ts_point[0]<400){

			show_pic_automatic(lcd,List_Head);
		}else{
			show_pic_manual(lcd,List_Head);
		}	
	}

	return 0;
}
